import request from "@/utils/request";
import { service } from "../eventManagement/eventManagement";
/**
 * 新增告警标签
 * lableName 标签名称
 * */
export function addLable(data) {
  return request({
    url: service() + "/alarm/lable/addLable",
    method: "post",
    data: data,
  });
}
/**
 * 删除告警标签
 * lableId 标签Id
 * */
export function deleteLable(data) {
  return request({
    url: service() + "/alarm/lable/deleteLable",
    method: "post",
    data: data,
  });
}
/**
 * 编辑告警标签
 * lableId 标签Id
 * lableName 标签名称
 * */
export function modifyLable(data) {
  return request({
    url: service() + "/alarm/lable/modifyLable",
    method: "post",
    data: data,
  });
}
/**
 * 获取所有告警标签
 * */
export function getAllLables() {
  return request({
    url: service() + "/alarm/lable/getAllLables",
    method: "get",
  });
}
/**
 * 保存当前事件告警标签信息
 * waringOrderId
 * lables:[{lableName,lableId}]
 * */
export function saveLableRelation(data) {
  return request({
    url: service() + "/alarm/lable/saveLableRelation",
    method: "post",
    data: data,
  });
}
/**
 * 查询当前事件告警标签信息
 * */
export function getLableByAlarm(data) {
  return request({
    url: service() + "/alarm/lable/getLableByAlarm/" + data,
    method: "get",
  });
}
